﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmpleadoProyectoEditGrid.ascx.cs" 
Inherits="UILGestion.Seguridad.Empleado.EmpleadoProyectoEditGrid" %>


 <%@ Register assembly="WebLib" namespace="WebLib" tagprefix="lib" %>


<input id="idEmpleado" type="hidden" runat="server"/>


<asp:UpdatePanel ID="GridUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>



<table >
<tr>
<td  align="left">
<asp:GridView ID="itemGridView" Runat="Server" 
                SkinID="GridView"
                DataKeyNames="idInternal" 
               onrowcancelingedit="CancelItem" 
                onrowediting="EditItem" 
                OnRowUpdating="UpdateItem" 
                ShowFooter="True">
                            
                 <Columns>
                 <asp:TemplateField HeaderStyle-HorizontalAlign="Left" 
                        HeaderStyle-Width="350px" HeaderText="PROYECTO" ItemStyle-Width="350px">
                        
                        
                   <ItemTemplate>
                   <asp:Label ID="descripcionLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("ObraStr")%>'></asp:Label></ItemTemplate>


                   <EditItemTemplate>
                    <asp:Label ID="descripcionLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("ObraStr")%>'></asp:Label></ItemTemplate>
                            
                   </EditItemTemplate>
                 <FooterTemplate>
                     <asp:DropDownList ID="proyectoInsertDropDownList" runat="server" 
                           Width="250px"></asp:DropDownList>
                           
                           
                           </FooterTemplate>
                           
                           
                           </asp:TemplateField>



                    <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="300px" 
                        HeaderText="Detalle" ItemStyle-Width="300px">
                  
                  
                  <ItemTemplate>
                            <asp:Hyperlink runat= "server" ForeColor="Blue"
                            Text='<%# DataBinder.Eval(Container.DataItem,"rolstr").ToString()%>'  
                            Target="_self"  ID="rolID"
                            NavigateUrl='<%# "~/Seguridad/RolReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idRol").ToString()  %>' 
                           ></asp:Hyperlink>  
                    </ItemTemplate>
                   
                   <FooterTemplate>
                   <asp:DropDownList ID="rolInsertDropDownList" runat="server"   
                           Width="250px"></asp:DropDownList>


                   </FooterTemplate>
                   <EditItemTemplate>
                   <asp:DropDownList ID="rolEditDropDownList" runat="server"   
                           Width="250px"></asp:DropDownList>
                           <lib:Input runat="server" ID="idRoltxt" ReadOnly="true" Text='<%# Eval("idRol")%>' Width="0"></lib:Input>
                   </EditItemTemplate>

                    </asp:TemplateField>

                      <asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel.gif" 
                            EditImageUrl="~/Images/edit.gif" ShowEditButton="true" 
                            UpdateImageUrl="~/Images/update.gif" />

                     
                    <asp:TemplateField>
                    <ItemTemplate><asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                            CommandArgument='<%# Eval("idInternal")%>' ImageUrl="~/Images/delete.gif" 
                            OnClick="DeleteItem" 
                            OnClientClick="return confirm('Usted quiere eliminar?')" />
                    </ItemTemplate>
                    <FooterTemplate>
                    <asp:Button ID="addProvAdd" runat="server" OnClick="AddItem" Text="Añadir" CssClass="ms-crm-List-Header"  /></FooterTemplate></asp:TemplateField></Columns>
                              </asp:GridView>

 <tr>
<td align="right">
 <asp:LinkButton ID="addObra" runat="server" onclick="addObra_Click" ForeColor="Blue"> Asignar Proyectos</asp:LinkButton>
</td>
</tr>

</td>
</tr>
</table>
 
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="addObra" />
</Triggers>
</asp:UpdatePanel>






